home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / bbs / fnos16a5.zip / HELP.ZIP / DIALER < prev    next >
Text File  |  1996-10-15  |  7KB  |  219 lines

  1.  
  2. dialer
  3.  
  4.         dialer <interface> [<dialer_file> [<seconds> [<pings> [<hostid>]]]]
  5.  
  6.         Set up an autodialer session for the interface.  Whenever the
  7.         interface is idle for the interval in <seconds>, the autodialer
  8.         will ping the <hostid>.  If there is no answer after <pings>
  9.         attempts, the autodialer will execute the special commands
  10.         contained in the <dialer_file>.
  11.  
  12.         If no <dialer_file> is specified, a previous dialer command
  13.         process will be removed.  If the number of <pings> is omitted, the
  14.         <dialer_file> will be executed without first pinging the <host>.
  15.  
  16.         The <dialer_file> may have any valid name, and is located in the NOS
  17.         root directory unless a full pathname is provided.  The dialer
  18.         commands in the file are described below.
  19.  
  20.         >> Examples:  dialer sl0 ns9tel.dia 30 10 ns9tel
  21.  
  22.  
  23. DIALER FILE COMMANDS
  24.  
  25.         control down|up
  26.  
  27.         Control the 'asy' interface.  The 'down' option drops DTR and
  28.         RTS.  The 'up' option asserts DTR and RTS.
  29.  
  30.         >>  Example:  control down
  31.  
  32.  
  33.  
  34.         send "<string>" [<milliseconds>]
  35.  
  36.         This dialer command will write the specified string to the
  37.         interface. The string quote marks are required, and the string
  38.         may not contain embedded control characters.  However, the
  39.         standard C string escape sequences are recognized (but \0 should
  40.         not be used).  If <milliseconds> is specified, the <string>
  41.         characters are sent with a <milliseconds> inter-character delay,
  42.         useful for ancient Micom switches!
  43.  
  44.         >> Example:  send "atdt555-1212"
  45.  
  46.  
  47.  
  48.         speed [ 115200|57600|38400|19200|9600|4800|2400|1200|300 ]
  49.  
  50.         This command sets the speed of the interface to one of the
  51.         available speeds.  If the speed argument is missing, the speed
  52.         will be displayed in the dialer session window.
  53.  
  54.         >> Example:  speed 1200
  55.  
  56.  
  57.  
  58.         wait <milliseconds> [ "test_string"  [speed|ipaddress]]
  59.  
  60.         If only the time is specified, the dialer pauses for the desired
  61.         number of milliseconds.  Otherwise, the dialer reads until the
  62.         <test_string> is detected on the interface.
  63.  
  64.         If the string is not detected within the desired time, the
  65.         autodialer will reset.  The string quote marks are required, and
  66.         the string may not contain embedded control characters. However,
  67.         the standard C string escape sequences are recognized (but \0
  68.         may not be used).
  69.  
  70.         If the "speed" keyword is specified, the dialer will continue
  71.         to read characters until a non-digit is detected.  The string
  72.         read is converted to an integer, and used to set the interface
  73.         speed.  If the trailing non-digit is not detected within the
  74.         desired time, or the integer value is not a valid speed, the
  75.         autodialer will reset.
  76.  
  77.         If the "ipaddress" keyword is specified, the dialer will continue
  78.         to read characters until a dotted-quad IP address is detected.
  79.         The numeric address is used to set the interface IP address.
  80.         If a trailing non-digit is not detected within the specified
  81.         time, or the address is invalid, the autodialer will reset.  This
  82.         option is only available when SLIP was #define'd at compile time,
  83.         since PPP protocol supports address negociation.
  84.  
  85.         >> Example:  wait 45000 "CONNECT " speed
  86.         >> Example:  wait 5000 "Assigned IP address is" ipaddress
  87.  
  88.  
  89. DIALER FILE EXTENDED COMMANDS
  90.  
  91.  
  92.         failmode  [ on | OFF ]
  93.  
  94.         'failmode' establishes whether the dialer should continue after
  95.         a failed dialer command.  <off> implies abort the dialing script,
  96.         while <on> means continue the script, which in effect enables
  97.         the 'ifok' and 'iffail' commands.
  98.  
  99.  
  100.         begin
  101.  
  102.         'begin' starts a block of commands, and is typically used
  103.         after an 'ifok' or 'iffail' command.
  104.  
  105.  
  106.         end
  107.  
  108.         'end' terminates a block of commands, which extends to the
  109.         previous unpaired 'begin'.
  110.  
  111.  
  112.         exit [<return_code>]
  113.  
  114.         'exit' ends the dialer script, with the result code set to that
  115.         of the previous dialer command unless <return_code> is specified.
  116.  
  117.  
  118.         status  [ up | down ]
  119.  
  120.         'status' is similar to the 'control' command, except that the
  121.         iostatus() routine is notified.
  122.  
  123.  
  124.         ifok <cmd>
  125.  
  126.         'ifok' invokes the dialer command <cmd> if the previous command
  127.         was successful.
  128.  
  129.  
  130.         iffail <cmd>
  131.  
  132.         'iffail' invokes the dialer command <cmd> if the previous command
  133.         was not successful.
  134.  
  135.  
  136.         verbose  [ ON | off ]
  137.  
  138.         'verbose' sets the verbosity level of the dialer, that is, whether
  139.         the dialer echoes the script commands as they are read and displays
  140.         output received during the wait command.  The "off" setting is
  141.         recommended for those well-debugged scripts used with the ping/redial
  142.         option.  The verbose setting is retained across dialer invocations.
  143.  
  144. If FTN extensions are compiled in and 'ftnopt mode' is on:
  145.  
  146.         goto <label>
  147.  
  148.         'goto' causes a reparsing of the dialer file from the beginning
  149.         and repositions the next dialer file read to the line
  150.         immediately following the named target label. The target label
  151.         must be preceeded by a ':' and start in the first column. The
  152.         search is not case sensitive but must be unique, ie. a goto
  153.         label of 'go' will match with both target labels of ':go' and
  154.         ':gohere'.
  155.  
  156. FTN notes:
  157.  
  158.         The 'ftnopt failexit on' command from the autoexec.nos startup
  159.         file or from the fnos> prompt will cause FNOS to exit back to
  160.         DOS should the dialer fail to establish a carrier after the
  161.         'ftnopt redialtry <count>' is reached.
  162.  
  163.  
  164. DIALER EXAMPLE FILE
  165.  
  166. The following dialer script will perform these steps:
  167. . drop DTR & RTS to force a hangup
  168. . wait 2 seconds and then raise DTR & CTS
  169. . set the port speed to 9600 baud and initialize the modem
  170. . dial a number
  171. . turn on continue-after-error mode
  172. . wait for the modem to return a CONNECT message
  173. . abort if a BUSY was received instead of CONNECT, or dial-out failed
  174. . try three times to send a CR and obtain a Login: prompt
  175. . send my login name, password, wait 5 seconds and then exit
  176.  
  177. #verbose off             [enable when well-debugged, to eliminate most output]
  178. control down
  179. wait 2000
  180. control up
  181. speed 9600
  182. send "atz\ratm0l0e0\r"
  183. wait 1000
  184. send "atdt555-1212\r"
  185. # Let's assume a BUSY will always be detected within 10s, and a connect ALWAYS
  186. # takes longer.  Also, if we invoked dialer with the ping options, this gives
  187. # us an eventual busy redial.  -- n5knx
  188. failmode on
  189. wait 10000 "BUSY"
  190. ifok exit 1
  191. wait 60000 "CONNECT"
  192. iffail exit
  193. wait 2000
  194. send "\r"
  195. wait 5000 "ogin"
  196. iffail begin
  197.  send "\r"
  198.  wait 5000 "ogin"
  199.  iffail begin
  200.   send "\r"
  201.   wait 5000 "ogin"
  202.   iffail begin
  203.    control down
  204.    exit 1
  205.   end
  206.  end
  207. end
  208. wait 1000
  209. send "myname\r"
  210. wait 5000 "assword"
  211.   iffail begin
  212.    control down
  213.    exit 1
  214.   end
  215. wait 1000
  216. send "mypassword\r"
  217. wait 5000
  218. exit
  219.